package cn.chenxinjie.hrm.feign;

import cn.chenxinjie.hrm.util.AjaxResult;
import feign.hystrix.FallbackFactory;

/**
 * @author 陈鑫杰
 * @date 2022/3/22 17:06
 */
public class UserInfoFallBackFactory implements FallbackFactory<UserInfoFeign> {

    @Override
    public UserInfoFeign create(Throwable throwable) {
        return new UserInfoFeign() {
            @Override
            public AjaxResult getTenantInfoById(Long id) {
                return AjaxResult.me().setSuccess(false).setResultObj("G啦!");
            }
        };
    }
}
